<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="UTF-8">
  <title>新增</title>
  <link rel="stylesheet" href="${basePath}style.css">
  <link rel="stylesheet" href="${basePath}font-awesome-4.7.0/css/font-awesome.min.css">
</head>
<body>
<div class="add">
  <form class="addForm" action="${basePath}teacher?method=add" method="post">
    <table class="tableadd">
      <tr>
        <td>ID :</td>
        <td><input type="text" name="tid"></td>

      </tr>
      <tr>
        <td>账号:</td>
        <td><input type="text" name="teaUsername"></td>

      </tr>
      <tr>
        <td>姓名:</td>
        <td><input type="text" name="teaName"></td>

      </tr>
      <tr>
        <td>密码:</td>
        <td><input type="password" name="teaPwd" value="123456">
          初始密码为123456
        </td>

      </tr>
      <tr>
        <td colspan="4" align="left" >
          <button class="edit" onclick="window.history.back(-1);">
            <i class="fa fa-arrow-left"></i>
            返回
          </button>
          <button class="remove" type="submit">
            <i class="fa fa-save"></i>
            提交
          </button>
        </td>
      </tr>
    </table>
  </form>
</div>
</body>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript"></script>
<script  src="${basePath}validation/jquery.validate.js" type="text/javascript"></script>
<script  src="${basePath}validation/localization/messages_zh.js" type="text/javascript"></script>
<script>
  $(function(){
    $('.addForm').validate({
      rules:{
        tid:{
          required:true,
          digits:true
        },
        teaUsername:"required",
        teaName:"required",
        teaPwd:{
          required:true,
          rangelength:[6,15]
        }
      }
    });
  });
</script>
</html>
